package com.autumn.xa.a.offerdemo;

import org.openjdk.jol.info.ClassLayout;

/**
 * ClassName: JavaObjectSize
 *
 * @Description:
 * @Author: wangqiuyang
 * @Date: 2022/6/17 6:14 下午
 * History:
 * <author>          <time>          <version>          <desc>
 * wangqiuyang    2022/6/17 6:14 下午   @Version 1.0        描述
 */
public class JavaObjectSize {
    private static class T {
        int a;
        long b;
        boolean c;
        String d = "ddddddddddddxddddddd";
    }

    public static void main(String[] args) {
        // -XX:-UseCompressedOops 关闭压缩
        T o = new T();
        System.out.println(ClassLayout.parseInstance(o).toPrintable());
    }
}
